1. Field of the Invention
The present invention relates to an optical encoder configured to measure the displacement of a diffraction grating, more particularly though not exclusively, measuring the displacement by emitting a light beam from a light source onto the diffraction grating and counting light-dark fringes in the interference pattern formed.
2. Description of the Related Art
Known optical encoders include a main scale formed from a square wave amplitude grating in which light transmissive portions and light shielding portions (or light reflective portions and light non-reflective portions) having the same width are arranged at a predetermined pitch.
A transmissive optical encoder emits parallel light beams to the scale. The light beams passing through the scale and having a square wave pattern further pass through an index scale in which light transmissive portions and light shielding portions are arranged at a predetermined pitch. The transmitted light beams are received by a light-receiving element.
By receiving a light-dark pattern of the light passing through the index scale and being modulated by the relative movement of the main scale and the index scale, the light-receiving element generates a displacement signal that periodically varies in accordance with the relative movement. By processing the displacement signal, the displacement can be measured.
In the index scale, the light transmissive portions and light shielding portions (or the light reflective portions and light non-reflective portions) having the same width are alternately arranged at the predetermined pitch.
In most transmissive optical encoders, in order to obtain two sine wave signals that are out of phase by 90° (known as A-phase and B-phase sine wave signals), two square wave amplitude grating areas are provided.
In such measuring apparatuses, a fine measurement resolution is required. Accordingly, the number of interpolations is increased using an electrical dividing device. To obtain a finely divided signal, it is useful that an ideal sine wave signal is provided to the electrical dividing device used to divide the displacement signal.
However, geometrically, the displacement signal obtained from the above-described optical encoder is a triangular wave or a trapezoidal wave corresponding to changes in the overlap of the scale gratings.
In particular, if the pitch is relatively coarse or a sufficiently coherent light source is used, the displacement signal tends to be a triangular wave or a trapezoidal signal. The displacement signal composed of such a pseudo sine wave signal has a large waveform distortion.
Additionally, the distortion ratio markedly varies in accordance with variations in the distance between the main scale and the index scale. When a position is measured using such a displacement signal having such a variation in distortion-ratio, a large interpolation error occurs, which results in a measurement error of the position.
Accordingly, several techniques for reducing harmonic distortion of the optical encoder have been proposed.
For example, in order to reduce the harmonic components in the light intensity distribution of multiple wave interference fringes, which are formed in an area in an space behind the main scale where diffraction light beams overlap, a square wave amplitude grating is improved using the following techniques:    (1) The width of the light transmissive portion of the main scale of the square wave amplitude grating is non-uniformly differentiated from that of the light shielding portion while maintaining the pitch so that the square wave amplitude grating virtually functions as a sine wave grating (refer to, for example, Japanese Patent No. 2695623).    (2) The ratio of the width of the light transmissive portion to that of the light shielding portion is changed from 1:1 to 2:1 (refer to, for example, Japanese Patent Laid-Open No. 09-196705).
However, in the technique (1), the illumination distribution on the scale should be uniform.
The optical encoder has a structure in which gratings having non-uniform aperture ratios are appropriately distributed on a surface of the main scale. In this structure, the optical encoder has an adverse effect from the non-uniform illumination distribution.
In the technique (2), the harmonic distortion can be reduced simply by changing the aperture width of the square wave amplitude grating on the main scale.
In addition, since the aperture widths are uniformly changed in the entire effective area of the gratings on the main scale, the distortion can be reduced even when non-uniform illumination is present.
Furthermore, from a viewpoint of the ease of manufacturing, it is easy to set a desired aperture ratio while maintaining the high precision of the pitch on the main scale.
However, in technique (2), the ratio of the width of the light transmissive portion to the light shielding portion is changed from 1:1 to 2:1. Therefore, the above-described feature disappears at a particular gap position. Therefore, the reduction in the distortion at any gap is difficult.
Accordingly, to remove or reduce the distortion more effectively, the harmonic distortion should be reduced from the light intensity distribution of the multiple wave interference fringes projected on the index scale.
That is, the distortion of a diffraction image on the main scale should be removed.
The problems of the technique (2) are described in detail with reference to a description and drawings of Japanese Patent Laid-Open No. 09-196705 and FIGS. 17A and 17B.
FIG. 17A is a diagram illustrating the structure of the main portion of the known optical encoder.
As shown in FIG. 17A, a main scale 1 is a transmissive main scale on which light transmissive portions 11 and shielding portions 12 are arranged at a pitch of P. The width of the light transmissive portion 11 is 2P/3.
On an index scale 3, light transmissive portions and shielding portions are arranged at a pitch of P. The width of the light transmissive portion is the same as that of the shielding portion.
In such a structure, the operation and features of technique (2) are described as follows.
It is noted that, in the following description of the cited reference, “FIG. 4” in the cited reference is replaced with “FIG. 17B.”
“. . . In this exemplary embodiment, as described above, the width of the light transmissive portion 11 of the main scale 1 is set to 2P/3. Thus, the third harmonic wave of a displacement output signal, which is a pseudo sine wave, is removed. The principal is described next with reference to FIG. 17B. Let P denote the pitch of the main scale 1 and L denote the width of the light transmissive portion 11. When parallel beams are incident on the main scale 1 and only straight light components are discussed, the transmissive light pattern of the main scale 1 appears to be a square wave pattern, as shown in FIG. 17B. At that time, a transmissive light intensity pattern I(x) in the displacement direction x can be expressed using Fourier expansion as follows:
                                                                        I                ⁡                                  (                  x                  )                                            =                            ⁢                                                C                  ·                                                            ∑                                              n                        =                        1                                            ∞                                        ⁢                                                                                            1                          -                                                      cos                            ⁡                                                          (                                                              2                                ⁢                                n                                ⁢                                                                                                                                  ⁢                                π                                ⁢                                                                                                                                  ⁢                                                                  L                                  /                                  P                                                                                            )                                                                                                      n                                            ⁢                                              sin                        ⁡                                                  (                                                      2                            ⁢                            n                            ⁢                                                                                                                  ⁢                            π                            ⁢                                                                                                                  ⁢                                                          x                              /                              P                                                                                )                                                                                                                    +                                                                                                      ⁢                                                C                  ·                                                            ∑                                              n                        =                        1                                            ∞                                        ⁢                                                                                            sin                          ⁡                                                      (                                                          2                              ⁢                              n                              ⁢                                                                                                                          ⁢                              π                              ⁢                                                                                                                          ⁢                                                              L                                /                                P                                                                                      )                                                                          n                                            ⁢                                              cos                        ⁡                                                  (                                                      2                            ⁢                            n                            ⁢                                                                                                                  ⁢                            π                            ⁢                                                                                                                  ⁢                                                          x                              /                              P                                                                                )                                                                                                                    +                D                                                                        (        1        )            
In equation (1), C and D denote constant values. This transmissive light pattern is further modulated by the index scale 3 on the light receiving side. Thus, a pseudo sine-wave output can be obtained. As can be seen from equation (1), when the third harmonic wave, which is the highest odd harmonic component, is discussed (i.e., n=3), both coefficients of the first and second terms become zero when L=P/3 or L=2P/3. Therefore, since L=2P/3 in this exemplary embodiment, the third harmonic component is removed from the displacement signal. Consequently, a displacement signal that is close to a sine wave can be obtained. . . . ” (the end of cited sentences).
The above-described cited reference has several drawbacks. The first drawback is that the intensity pattern I(x) expressed as equation (1) represents the intensity transmission ratio distribution of the grating. There is no problem if the light intensity pattern immediately after the main scale is considered to be such a square pattern. However, as shown in FIG. 17A, in the actual structure of the encoder, a predetermined gap (z) is provided between the main scale and the index scale.
In this actual structure, equation (1) does not represent the light intensity distribution of the interference fringes overlapped on the index scale. That is, the light intensity distribution should be represented by at least a function I(x, z).
The light intensity distribution I(x) expressed as equation (1) is approximately true only at the following particular gap position Zn:Zn=nP2/λ(n=1, 2, 3, . . . )  (2)where λ is the wavelength of a light source and P is a scale pitch.
This intensity distribution appearing at the particular gap position Zn and being proportional to the intensity transmission ratio distribution of the grating is referred to as a “Fourier image.”
As a second drawback, according to technique (2), it is assumed that, at the gap position Zn where equation (1) is approximately true and the Fourier image is generated, the optical effective aperture ratio (i.e., the ratio of the width of the transmissive portion to that of the shielding portion) of the main scale is set to 2:1 instead of 1:1.
In square wave amplitude gratings, some combinations of the 0th-, ±1st-, ±2nd-, and ±3rd-order diffracted light components in the generated diffracted light, that is, (0, +3), (0, −3), (+1, −2), and (−1, +2) contribute to the generation of the third harmonic component contained in the displacement waveform.
In the technique (2), when the aperture ratio is 2:1 (1:2 is also allowed), the third-order diffracted light is missing (a missing order).
Accordingly, the combinations (0, +3) and (0, −3) are eliminated. However, the components for the combinations (+1, −2) and (−1, +2) still remain. Except for the case where the components for the combinations (+1, −2) and (−1, +2) are canceled due to a 180° out-of-phase relationship, the third-order component distortion is not eliminated.
As described above, in the technique (2), I(x) is only a Fourier expansion of a transmissive light pattern on the surface of the main scale, and therefore, this equation does not represent the light intensity distribution in the diffraction space behind the main scale.
Consequently, to eliminate the high-order harmonic components by changing the optical effective aperture ratio of the main scale, the following light intensity distribution formed behind the diffraction grating on the main scale should be found using an optical effective aperture ratio of the diffraction grating AR and the gap size z:I(x, y, z, AR, λ)  (3)
That is, the light intensity distribution based on a so-called “diffraction theory” should be computed.